package com.ccnf.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ccnf.model.entity.InvitationReport;
import com.ccnf.model.vo.InviExcelEntity;
import com.ccnf.model.vo.InviRecordVO;
import com.ccnf.model.vo.InvitationVO;
import com.ccnf.model.vo.ReportVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author developer
 * @since 2019-03-15
 */
public interface InvitationReportMapper extends BaseMapper<InvitationReport> {

    ReportVO selectInvitationReport(@Param("invitationId") Long invitationId,
                                          @Param("startTime") Long startTime,
                                          @Param("reportType") Integer reportType);

    InvitationReport selectInvitationRecord(@Param("invitationId") Long invitationId);

    /**
     * 查看邀请函总排名数据
     * @param expoId 展会ID
     * @param rankType 排序类型，0：浏览，1：登记，2：收藏，3：转发点击
     */
    List<InvitationVO> selectInvitationRecordList(@Param("expoId") Long expoId,
                                                  @Param("rankType") Integer rankType);

    List<InviExcelEntity> selectInviReport(@Param("expoId") Long expoId);

    InvitationReport selectInvitationReportInfo(@Param("invitationId") Long invitationId,
                                                @Param("reportTime") Long reportTime);

    /**
     * 查询全部邀请函的统计数据
     * @param expoId 展会ID
     * @param recordType 统计类型，0：总，1：今日
     * @return
     */
    InviRecordVO selectInviCountRecord(@Param("expoId") Long expoId,
                                       @Param("recordType") Integer recordType,
                                       @Param("reportTime") Long reportTime);

    ReportVO selectInvitationCountReport(@Param("expoId") Long expoId,
                                         @Param("startTime") Long startTime,
                                         @Param("reportType") Integer reportType);
}
